html {
  overflow-y: scroll;
  height: 100%;
  width: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  background-image: linear-gradient(to top, rgba(0,0,0,0.5)50%,rgba(0,0,0,0.5)50%), url('Web Images/about us.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  width: 100%;
  position: relative;
  overflow-x: hidden;
  font-family: 'Arial', sans-serif;
  min-width: 320px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.nav-wrapper {
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  background-color: transparent;
  transition: all 0.3s ease;
}

.nav-wrapper:hover {
  background-color: rgba(0, 0, 0, 0.95);
}

.navbar {
  max-width: 1500px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  margin: 0 auto;
  box-sizing: border-box;
  flex-wrap: nowrap;
}

.logo {
  width: 100px;
  height: 100px;
  min-width: 100px;
  object-fit: cover;
  border-radius: 50%;
  cursor: pointer;
  user-select: none;
  transition: transform 0.3s ease;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.logo:hover {
  transform: scale(1.1);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 30px;
  margin-left: auto;
  padding: 0;
  flex-wrap: nowrap;
}

.nav-links li a {
  position: relative;
  display: inline-block;
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: 24px;
  padding: 10px 20px;
  border: 3px solid yellow;
  border-radius: 25px;
  overflow: hidden;
  z-index: 1;
  background: transparent;
  transition: all 0.3s ease;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.nav-links li a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  height: 100%;
  width: 100%;
  background-color: cyan;
  z-index: -1;
  transition: all 0.3s ease;
  border-radius: 25px;
}

.nav-links li a:hover::before {
  left: 0;
}

.nav-links li a:hover {
  color: red;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Image popup overlay */
.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.popup img {
  max-width: 80%;
  max-height: 80%;
  border-radius: 10px;
  cursor: pointer;
}

/* Remove blue outline when image is clicked */
.logo:focus,
.logo:active,
.logo:focus-visible {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.SBPI {
  font-size: 3rem;
  font-weight: bold;
  margin-left: 20px;
  color: yellow;
  white-space: nowrap;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.nav-wrapper h1 span {
  display: inline-block;
  color: yellow;
  transition: all 0.3s ease;
}

.nav-wrapper h1 span:hover {
  transform: scale(1.2) rotate(5deg);
  color: lightpink;
  text-shadow: 0 0 10px rgba(255, 182, 193, 0.7);
}

/* Content Container */
.content-container {
  max-width: 1200px;
  margin: 150px auto 50px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 50px;
}

.about-contents {
  max-width: 500px;
  margin: 220px auto 80px 50px;
  padding: 40px;
  background-color: rgba(0, 0, 0, 0.8);
  border-radius: 25px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 255, 0.3);
  position: relative;
  transform: translateZ(0);
  backface-visibility: hidden;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.about-contents:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 255, 0.4);
  border-color: rgba(0, 0, 255, 0.3);
}

.about-contents h1 {
  font-size: 36px;
  margin-bottom: 20px;
  color: gold;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.about-contents span {
  color: violet;
  text-shadow: 0 0 10px rgba(238, 130, 238, 0.5);
}

.about-contents p {
  font-size: 20px;
  color: lightblue;
  font-style: italic;
  line-height: 1.8;
  margin: 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.mission-contents {
  max-width: 500px;
  margin: 80px 50px 80px auto;
  padding: 40px;
  background-color: rgba(0, 0, 0, 0.8);
  border-radius: 25px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 255, 0, 0.3);
  position: relative;
  transform: translateZ(0);
  backface-visibility: hidden;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.mission-contents:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 255, 0, 0.4);
  border-color: rgba(0, 255, 0, 0.3);
}

.mission-contents h1 {
  font-size: 36px;
  margin-bottom: 20px;
  color: gold;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.mission-contents span {
  color: violet;
  text-shadow: 0 0 10px rgba(238, 130, 238, 0.5);
}

.mission-contents p {
  font-size: 20px;
  color: lightblue;
  font-style: italic;
  line-height: 1.8;
  margin: 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.vision-contents {
  max-width: 500px;
  margin: 80px auto 80px 50px;
  padding: 40px;
  background-color: rgba(0, 0, 0, 0.8);
  border-radius: 25px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(255, 0, 0, 0.3);
  position: relative;
  transform: translateZ(0);
  backface-visibility: hidden;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.vision-contents:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(255, 0, 0, 0.4);
  border-color: rgba(255, 0, 0, 0.3);
}

.vision-contents h1 {
  font-size: 36px;
  margin-bottom: 20px;
  color: gold;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.vision-contents span {
  color: violet;
  text-shadow: 0 0 10px rgba(238, 130, 238, 0.5);
}

.vision-contents p {
  font-size: 20px;
  color: lightblue;
  font-style: italic;
  line-height: 1.8;
  margin: 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Footer Styles */
.footer {
  background-color: rgba(0, 0, 0, 0.85);
  padding: 30px 0;
  text-align: center;
  position: relative;
  bottom: 0;
  width: 100%;
  margin-top: 50px;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 0 0 20px 0;
  padding: 0;
  list-style: none;
}

.social-icons a {
  color: white;
  font-size: 24px;
  transition: all 0.3s ease;
}

.social-icons a:hover {
  color: cyan;
  transform: translateY(-5px);
}

.copyright {
  color: white;
  font-size: 14px;
  margin: 0;
  padding: 0;
  opacity: 0.8;
}

.copyright span {
  color: yellow;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .nav-wrapper {
    background-color: transparent;
    transition: background-color 0.3s;
  }
  .nav-wrapper:hover,
  .nav-wrapper:active,
  .nav-wrapper:focus-within {
    background-color: #111;
  }
  .navbar {
    padding: 12px 0 0 0;
  }
  .logo {
    width: 60px;
    height: 60px;
    min-width: 60px;
    margin-bottom: 5px;
  }
  .SBPI {
    font-size: 22px;
    margin: 0;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 12px;
    line-height: 1.3;
  }
  .nav-links {
    width: 100%;
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    margin: 8px 0;
    padding: 0 10px;
  }
  .nav-links li {
    flex: 1;
    max-width: 105px;
  }
  .nav-links li a {
    font-size: 14px;
    padding: 8px 12px;
    width: 100%;
    display: block;
    text-align: center;
    box-sizing: border-box;
    border-width: 2px;
  }
  .about-contents,
  .mission-contents,
  .vision-contents {
    margin-top: 70px !important;
    width: 90% !important;
    max-width: 400px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 5vw !important;
    padding-right: 5vw !important;
    box-sizing: border-box;
  }
  .about-contents {
    margin-top: 160px;
  }
  .about-contents h1,
  .mission-contents h1,
  .vision-contents h1 {
    font-size: 24px;
    margin-bottom: 20px;
    padding: 0 5px;
  }
  .about-contents p,
  .mission-contents p,
  .vision-contents p {
    font-size: 15px;
    line-height: 1.6;
    padding: 0 5px;
  }
  .footer {
    padding: 25px 15px;
    margin-top: 40px;
  }
  .social-icons {
    gap: 25px;
    margin-bottom: 20px;
  }
  .social-icons a {
    font-size: 24px;
  }
  .copyright {
    font-size: 14px;
    line-height: 1.4;
    padding: 0 20px;
  }
}

@media screen and (max-width: 480px) {
  .nav-wrapper {
    background-color: transparent;
  }
  .nav-wrapper:hover,
  .nav-wrapper:active,
  .nav-wrapper:focus-within {
    background-color: #111;
  }
  .navbar {
    padding: 10px 0 0 0;
  }
  .logo {
    width: 50px;
    height: 50px;
    min-width: 50px;
  }
  .SBPI {
    font-size: 20px;
    padding: 0 8px;
  }
  .nav-links {
    gap: 8px;
    padding: 0 8px;
  }
  .nav-links li {
    max-width: 95px;
  }
  .nav-links li a {
    font-size: 13px;
    padding: 6px 10px;
  }
  .about-contents,
  .mission-contents,
  .vision-contents {
    margin-top: 60px !important;
    width: 96% !important;
    max-width: 320px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 4vw !important;
    padding-right: 4vw !important;
    box-sizing: border-box;
  }
  .about-contents {
    margin-top: 140px;
  }
  .about-contents h1,
  .mission-contents h1,
  .vision-contents h1 {
    font-size: 22px;
    margin-bottom: 15px;
  }
  .about-contents p,
  .mission-contents p,
  .vision-contents p {
    font-size: 14px;
    line-height: 1.5;
  }
  .footer {
    padding: 20px 10px;
  }
  .social-icons {
    gap: 20px;
    margin-bottom: 15px;
  }
  .copyright {
    font-size: 12px;
    padding: 0 10px;
    line-height: 1.4;
  }
}

/* Touch device optimizations */
@media (hover: hover) {
  .nav-links li a:hover {
    transform: translateY(-2px);
  }
  .logo:hover {
    transform: scale(1.05);
  }
  .nav-wrapper h1 span:hover {
    transform: scale(1.1);
    color: lightpink;
  }
  .about-contents:hover,
  .mission-contents:hover,
  .vision-contents:hover {
    transform: translateY(-3px);
  }
}

@media (hover: none) {
  .nav-links li a:active {
    transform: translateY(1px);
    background-color: cyan;
  }
  .logo:active {
    transform: scale(0.98);
  }
  .nav-wrapper h1 span:active {
    color: lightpink;
  }
}

/* Landscape mode */
@media screen and (max-height: 500px) and (orientation: landscape) {
  .navbar {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    padding: 8px;
    gap: 8px;
  }
  .logo {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }
  .SBPI {
    font-size: 18px;
    margin-left: 8px;
    padding: 0 6px;
  }
  .nav-links {
    width: auto;
    margin: 0;
    padding: 0 6px;
  }
  .nav-links li a {
    padding: 5px 8px;
    font-size: 13px;
  }
  .about-contents {
    margin-top: 120px;
  }
  .about-contents h1,
  .mission-contents h1,
  .vision-contents h1 {
    font-size: 20px;
    margin-bottom: 12px;
  }
  .about-contents p,
  .mission-contents p,
  .vision-contents p {
    font-size: 13px;
    line-height: 1.4;
  }
}

/* High-DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* Hamburger and Mobile Menu Styles */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
  width: 40px;
  height: 40px;
  position: relative;
  z-index: 1000;
}

.hamburger span {
  display: block;
  width: 28px;
  height: 3px;
  background: yellow;
  margin: 5px auto;
  transition: all 0.3s ease-in-out;
  border-radius: 2px;
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
  background: #ff3333;
}

.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: translateX(-20px);
}

.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
  background: #ff3333;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.95);
  padding: 80px 20px 20px;
  z-index: 999;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu ul li {
  margin: 15px 0;
  text-align: center;
}

.mobile-menu ul li a {
  color: white;
  text-decoration: none;
  font-size: 18px;
  display: block;
  padding: 10px;
  border: 2px solid yellow;
  border-radius: 25px;
  transition: all 0.3s ease;
}

.mobile-menu ul li a:hover {
  background: yellow;
  color: black;
}

@media screen and (max-width: 900px) {
  .nav-links {
    display: none !important;
  }
  .hamburger {
    display: block !important;
  }
  
  /* Hide title completely in mobile */
  .SBPI {
    display: none !important;
  }
  
  /* Adjust logo and navbar for removed title */
  .logo {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    margin: 0 !important;
  }
  
  .navbar {
    padding: 10px 15px !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  /* Fix content positioning */
  .about-contents {
    margin: 100px auto 40px !important;
    width: 90% !important;
    max-width: 400px !important;
    padding: 30px 20px !important;
  }

  .mission-contents {
    margin: 40px auto !important;
    width: 90% !important;
    max-width: 400px !important;
    padding: 30px 20px !important;
  }

  .vision-contents {
    margin: 40px auto !important;
    width: 90% !important;
    max-width: 400px !important;
    padding: 30px 20px !important;
  }

  .about-contents h1,
  .mission-contents h1,
  .vision-contents h1 {
    font-size: 24px !important;
    margin-bottom: 20px !important;
  }

  .about-contents p,
  .mission-contents p,
  .vision-contents p {
    font-size: 16px !important;
    line-height: 1.6 !important;
  }
}

@media screen and (min-width: 901px) {
  .mobile-menu {
    display: none !important;
  }
}